<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2017 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 老猫 <thinkcmf@126.com>
// +----------------------------------------------------------------------
namespace app\admin\controller;

use cmf\controller\AdminBaseController;
use think\Db;
use app\admin\model\ThemeModel;

class ProspectController extends AdminBaseController
{
    /**
     * 市场前景
     * 
     */
    public function index()
    {
        if ($this->request->isPost()) {
            $param = $this->request->param();
            $data = Db::name('system')->find();
            if (!$data) {
                Db::name('system')->insert($param);
            }else{
                Db::name('system')->where('id',$data['id'])->update($param);
            }
            $this->success('修改成功');
        }

        $data = Db::name('system')->find();
        $this->assign('data', $data['prospect']);
        return $this->fetch();
    }


}
